﻿<!-- #Include File = "Channel_Article.asp" -->
<%
Hits = ReplaceBadChar(Trim(Request("Hits")))
Select Case Hits
Case "Hits"
	Call Hit()
End Select
Private Function Hit()
	Vid = Trim(Request("id"))
	if Vid = "" Then
		Response.Write("0")
		Response.End()
	End if
	sqlView = "Select * From " & ChannelDataName & " Where ChannelID=" & ChannelID & " and Hidden=" & WK_True & " And IsDelete=" & WK_False & " and id=" & Vid & " Order By OrderID Desc,ID Desc"
	Call Exe_Conn(rsView,sqlView,1)
	If rsView.BOF And rsView.EOF Then
		rsView.Close
		Set rsView = Nothing
		Response.Write("0")
		Response.End()
	Else
		Select Case Action
		Case "List"
			
		Case Else
			Call Exec("","Update " & ChannelDataName & " Set Hits=Hits+1 Where ChannelID=" & ChannelID & " and Hidden=" & WK_True & " And IsDelete=" & WK_False & " and id=" & Vid,0)
		End Select
		Hits = rsView("Hits")
		Response.Write(Hits)
		rsView.Close
		Set rsView = Nothing
		Response.End()
		If IsConn = False Then Call CloseConn()
	End If
End Function
%>